package com.example.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author fyxw
 * 一级路由地址  localhost:8080/findOne
 */
@Controller
@RequestMapping("role")
public class RoleController {
    @RequestMapping("/findOne")
    public ModelAndView findOne(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("msg","findOne");
        modelAndView.setViewName("view");
        return modelAndView;
    }
    @RequestMapping("/findTwo")
    public ModelAndView findTwo(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("msg","findTwo");
        modelAndView.setViewName("view");
        return modelAndView;
    }
    @RequestMapping("/first")
    public ModelAndView first() {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("msg","first");
        modelAndView.setViewName("view");
        return modelAndView;
    }
    @RequestMapping
    public ModelAndView find() {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("msg","默认");
        modelAndView.setViewName("view");
        return modelAndView;
    }
}